package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.WechatMenuMapper;
import com.whq.entity.WechatMenu;
import com.whq.service.WechatMenuService;

@Service(value = "tdWechatMenuService")
public class WechatMenuServiceImpl implements WechatMenuService {

    @Autowired
    private WechatMenuMapper<WechatMenu>tdWechatMenuMapper;
    
    @Override
    public Integer insertSelective(WechatMenu tdWechatMenu) throws Exception {
           return this.tdWechatMenuMapper.insertSelective(tdWechatMenu);
        }

    @Override
    public Integer insertBatch(List<WechatMenu> tdWechatMenu) throws Exception {
           return this.tdWechatMenuMapper.insertBatch(tdWechatMenu) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdWechatMenuMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdWechatMenuMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(WechatMenu tdWechatMenu) {
           return this.tdWechatMenuMapper.updateByPrimaryKeySelective(tdWechatMenu);
    }

    @Override
    public WechatMenu findById(Object id) {
           return (WechatMenu) this.tdWechatMenuMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<WechatMenu> selectByCondition(WechatMenu tdWechatMenu) {
           return (List<WechatMenu>) this.tdWechatMenuMapper.selectByCondition(tdWechatMenu);
    }

    @Override
    public Integer selectCountByCondition(WechatMenu tdWechatMenu) {
           return  this.tdWechatMenuMapper.selectCountByCondition(tdWechatMenu);
    }

}
